Functional Incremental Attribute Evaluation
نویسندگان
چکیده
This paper presents a new strict, purely functional implementation of attribute grammars. Incremental evaluation is obtained via standard function memoization. Our new implementation of attribute grammars increases the incremental behaviour of the evaluators by both reducing the memoization overhead and increasing their potential incrementallity. We present also an attribute grammar transformation, which increases the incremental performance of the attribute evaluators after a change that propagates its effects to all parts of the syntax tree. These techniques have been implemented in a purely functional attribute grammar system and the first experimental results are presented.
منابع مشابه
Attribute Evaluation using Neighbour Functions
Design and implementation of attribute evaluators has received considerable attention ever since Knuth formulated the concept of attribute grammars. In particular, the class of Ordered Attribute Grammars (OAGs) has been of particular interest because practical and efficient attribute evaluators can been implemented based on the statically determined fixed plans for such grammars. Two main categ...
متن کاملIncremental Attribute Evaluation of LR - attributedgrammars Using Space - E cient Data
Incremental attribute evaluation of one-pass attribute grammars (AGs) has not yet been fully investigated. However, considering the lightness of one-pass AGs, combining incremental evaluation and parsing in one-pass AGs may bring about a time-and space-eecient language processor. In this paper, an incremental attribute evaluation method based on LR-attributed grammar, a class of one-pass attrib...
متن کاملZipper-based Embedding of Modern Attribute Grammar Extensions
This research abstract describes the research plan for a Ph.D project. We plan to define a powerful and elegant embedding of modern extensions to attribute grammars. Attribute grammars are a suitable formalism to express complex, multiple traversal algorithms. In recent years there has been a lot of work in attribute grammars, namely by defining new extensions to the formalism (forwarding and r...
متن کاملIncremental Evaluation of Ordered Attribute Grammars for Asynchronous Subtree Replacements
Incremental algorithms for evaluating attribute grammars (AGs) have been extensively studied in recent years, primarily because of their application in language-based environments. Ordered attribute grammars are a subclass of AGs for which efficient evaluators can be constructed. Previous incremental algorithms for ordered attribute grammars only allowed one modification 10 the program at a tim...
متن کاملYet Another Attribute Evaluator based on Recursive Functions
In this paper we present an approach to attribute evaluation based on recursive neighbour functions , which is different from what has been reported in the literature. The approach is valid for simple multi-visit attribute grammars. Neighbour functions, comprising of visit and suspend functions , allow attribute evaluation to start at the node of subtree replacement, and the approach can readil...
متن کامل